{% extends 'basic_app/master.html' %}
{% block tag_left %}
    {% include 'basic_app/tag_left_user.html' %}
{% endblock %}
{% block userinfo %}
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <h2 class="page-header">编辑实例页</h2>
        <form class="form-horizontal" action="/basic_app/host_edit"   method="post">
            <div class="form-group" style="display:none" >
                <label  class="col-sm-2 control-label">id：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  placeholder="id" name="v_id" value={{ hostinfo_result.id }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">名称：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  placeholder="名称" name="add_name" value={{ hostinfo_result.name }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">主机名：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  placeholder="主机名" name="add_hostname" value={{ hostinfo_result.hostname }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">IP：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="IP"  name="add_ip" value={{ hostinfo_result.ip }} >
                </div>
            </div>
                        <div class="form-group">
                <label  class="col-sm-2 control-label">port：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="port"  name="add_port" value={{ hostinfo_result.port }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">管理IP：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="管理IP"  name="add_gm_ip" value={{ hostinfo_result.gm_ip }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">其它IP：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="其他IP"  name="add_other_ip" value={{ hostinfo_result.other_ip }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">状态：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="状态" name="add_status" value={{ hostinfo_result.status }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">类别：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="类别"  name="add_type" value={{ hostinfo_result.type }}>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">操作系统版本：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="操作系统版本"  name="add_osversion" value={{ hostinfo_result.osversion }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">位置：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="位置"  name="add_place" value={{ hostinfo_result.place }} >
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">备注：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" placeholder="备注"  name="add_remark" value={{ hostinfo_result.remark }} >
                </div>
            </div>
            <div class="col-sm-10">
                <div style="text-align:center;vertical-align:middle;"><button type="submit" class="btn ">提交</button></div>
            </div>
        </form>
    </div>
{% endblock  %}
{% block script %}
    <script>
        window.onload=function(){
            var type_set = document.getElementById("type_select").getAttribute("type");
            document.getElementById("type_select").value=type_set}
    </script>
{% endblock %}